package top.yifengxiner.admin.web.controller.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import top.yifengxiner.common.core.pojo.AjaxResult;
import top.yifengxiner.common.core.pojo.vo.LoginBody;
import top.yifengxiner.framework.shiro.service.SysLoginService;


/**
 * @author ：baixiao
 * @date ：Created in 2021/5/5 14:47
 * @description：登录验证
 * @modified By：
 * @version: 0.0.1$
 */
@RestController
public class SysLoginController
{
    @Autowired
    private SysLoginService loginService;

    @PostMapping("/login")
    public AjaxResult ajaxLogin(@RequestBody LoginBody loginBody)
    {
        System.out.println(loginBody);
        return loginService.login(loginBody);
    }
}
